summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-06-15 22:48:23 +0200
committerCharles Lombardo <clombardo169@gmail.com>2023-06-16 21:49:49 +0200
commit5aca03d0ffc15aa7502c3f9e7d4e138de7524ea7 (patch)
tree04284ef0fb67b2331a7e1e13b8a792694f7ed712
parentMerge pull request #10801 from 8bitDream/fix_aspect (diff)
downloadyuzu-5aca03d0ffc15aa7502c3f9e7d4e138de7524ea7.tar
yuzu-5aca03d0ffc15aa7502c3f9e7d4e138de7524ea7.tar.gz
yuzu-5aca03d0ffc15aa7502c3f9e7d4e138de7524ea7.tar.bz2
yuzu-5aca03d0ffc15aa7502c3f9e7d4e138de7524ea7.tar.lz
yuzu-5aca03d0ffc15aa7502c3f9e7d4e138de7524ea7.tar.xz
yuzu-5aca03d0ffc15aa7502c3f9e7d4e138de7524ea7.tar.zst
yuzu-5aca03d0ffc15aa7502c3f9e7d4e138de7524ea7.zip
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt2
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt16
2 files changed, 17 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt
index c8c85dd7a..3b33f4faf 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt
@@ -42,7 +42,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
}
fun putSetting(setting: AbstractSetting) {
- if (setting.section == null) {
+ if (setting.section == null || setting.key == null) {
return
}
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
index 20a0636df..70a52df5d 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/utils/SettingsFile.kt
@@ -244,5 +244,21 @@ object SettingsFile {
val setting = settings[key]
parser.put(header, setting!!.key, setting.valueAsString)
}
+
+ BooleanSetting.values().forEach {
+ if (!keySet.contains(it.key)) {
+ parser.put(header, it.key, it.valueAsString)
+ }
+ }
+ IntSetting.values().forEach {
+ if (!keySet.contains(it.key)) {
+ parser.put(header, it.key, it.valueAsString)
+ }
+ }
+ StringSetting.values().forEach {
+ if (!keySet.contains(it.key)) {
+ parser.put(header, it.key, it.valueAsString)
+ }
+ }
}
}